export default function (getSex, getYear) {
  if (getSex == "男") {
    if (getYear < 2000) {
      var calcResult = (2000 - getYear) % 9;
    } else {
      var calcResult = (2099 - getYear) % 9;
    }
  } else {
    if (getYear < 2000) {
      var calcResult = (getYear - 1900 + 5) % 9;
    } else {
      var calcResult = (getYear - 2000 + 6) % 9;
    }
  }
  if (calcResult == 5 && getSex == "男") {
    calcResult = 2;
  } else if (calcResult == 5 && getSex == "女") {
    calcResult = 8;
  }
  switch (calcResult) {
    case 0:
      var fate = "9";
      break;
    case 1:
      var fate = "1";
      break;
    case 2:
      var fate = "2";
      break;
    case 3:
      var fate = "3";
      break;
    case 4:
      var fate = "4";
      break;
    case 6:
      var fate = "6";
      break;
    case 7:
      var fate = "7";
      break;
    case 8:
      var fate = "8";
      break;
  }
  return fate;
}
